//跨组件共享的数字数据
import { create } from "zustand";
interface CounterType {
  count: number;
  increment: () => void;
}
export const useCounter = create<CounterType>((set) => ({
  count: 10, //数据包
  increment: () => {
    set((state) => ({ count: state.count + 1 }));
  },
}));
